import {createStore,applyMiddleware} from 'redux'
import reducer from './reducer'
import thunk from 'redux-thunk'
import logger from 'redux-logger'
// 使用路由中间件，可以拦截到跳转路径的特殊actions，然后调用history实现路径跳转，把最新的路径信息写到路径仓库
import {routerMiddleware} from 'connected-react-router'

import history from '../store/history'
let store = createStore(reducer,applyMiddleware(routerMiddleware(history),thunk,logger))

export default store